﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace Repositories
{
    public partial class Meal
    {        
        public string NameByLanguage
        {
            get
            {
                if (Thread.CurrentThread.CurrentCulture.Name.Contains("en"))
                {
                    return this.EnglishName;
                }
                else
                    return this.Name;
            }
        }
        
        public string DescriptionByLanguage
        {
            get
            {
                if (Thread.CurrentThread.CurrentCulture.Name.Contains("en"))
                {
                    return this.EnglishDescription;
                }
                else
                    return this.Description;
            }
        }

        public string HighLightByLanguage
        {
            get
            {
                if (Thread.CurrentThread.CurrentCulture.Name.Contains("en"))
                {
                    return this.EnglishHighLight;
                }
                else
                    return this.HighLight;
            }
        }
    }
}
